
public class Calc {

	 public static void main(String[] args) {

	 	//System.out.printf("%s\n", "Enter the parameters in the format: 'number' '+' or '-' or 'x' or '/' 'number'");
		  if (args.length != 3)  {
               System.out.printf("%s\n", "Enter the required parameters in the format: 'number' 'math operation' 'number'");
           }
           else      {

                Double arg1 = Double.parseDouble(args[0]);
                Double arg2 = Double.parseDouble(args[2]);
             //   char sym = args[1].charAt(0);

               switch (args[1].charAt(0)) {
                   case '+':
                       System.out.printf("%.2f\n", arg1 + arg2);
                       break;
                   case '-':
                       System.out.printf("%.2f\n", arg1 - arg2);
                       break;
                   case 'x':
                       System.out.printf("%.2f\n", arg1 * arg2);
                       break;
                   case ':':
                       System.out.printf("%.2f\n", arg1 / arg2);
                   	   break;
               }
           }
     }
}